1. Field of the Invention
The present invention relates to a device for coding a picture signal by compression and a device for decoding a compressed picture signal by expansion. More particularly, the present invention is concerned with a picture signal compression coding device for eliminates the overflow of data which has undergone two-dimensional orthogonal transform in the event of coding, a compression coding device capable of reducing the amount of data to be stored in a Huffman coding table, and a decoding device for decoding data coded by such a coding device.
2. Description of the Related Art
Digital picture data representative of a picture picked up by an electronic still camera, for example, are stored in a memory. Various kinds of compression coding schemes have been proposed to reduce the amount of such digital picture data and thereby the required memory capacity. Among the compression coding schemes, a two-dimensional orthogonal transform coding scheme is extensively used because data is coded by a large compression ratio and because a minimum of picture distortions particular to coding occurs.
Two-dimensional orthogonal transform coding is such that picture data representative of a single picture are divided into a plurality of blocks, and the picture data are subjected to two-dimensional orthogonal transform block by block. A difference between a DC component included in the transformed data and DC component data immediately preceding it, for example, is produced and then subjected to Huffman coding. On the other hand, those portions of the picture data which have undergone orthogonal transform, i.e., the AC component of transform coefficients lower than a predetermined threshold are discarded, and then the remaining data are quantized by a predetermined step size, or normalized. By this kind of procedure, the values of transform coefficients, i.e., the dynamic range of amplitudes is suppressed.
The transform coefficients normalized as stated above are coded. Transform coefficient data are sequentially arranged in order of frequency, i.e., from low frequency components to high frequency components in matching relation to the size of picture data block. Since the transform coefficient data becomes zero more often in the higher frequency range than in the lower frequency range, run-length coding is executed to transform the data into a run-length of zeros and an amplitude of values other than zero, i.e., non-zeros. The data subjected to run-length coding is two-dimensionally Huffman-coded to produce compressed picture data.
In the two-dimensional orthogonal transform coding procedure stated above, the normalizing coefficient may be varied to change the compression ratio of picture data. For example, when a large normalizing coefficient is selected, transform coefficients are divided by the large normalizing coefficient resulting in small transform coefficient data and, therefore, in a large compression ratio. A large compression ratio degrades the quality of data, as well known in the art. Conversely, a relatively small normalizing coefficient desirably reduces the picture data compression ratio and thereby enhances the quality of data. However, a problem with a small normalizing coefficient is that transform coefficients divided thereby have large values to cause data to overflow during the subsequent run-length coding and Huffman coding. Coding the data while neglecting overflown data would prevent data having accurate values from being reproduced in the event of decoding.
A prerequisite with two-dimensional Huffman coding is that coded data to be produced by Huffman coding be stored as a look-up table beforehand in association with all the possible values of both of the differences of the DC component data and the AC component data which has undergone run-length coding. Taking account of the frequency of occurrence of the differences of the DC component data and the AC component data which has undergone run-length coding, the look-up table is loaded with data for coding such that short coded data and long coded data may be produced in response to values having high frequency of occurrence and values having low frequency of occurrence, respectively. More specifically, the look-up table stores long coded data for those values which occur with low frequency and are rarely used. This results in the need for a look-up table having a considerable capacity.